import com.ansuenjob.db.dao.QueryDao;
import com.ansuenjob.model.BstCompanyAccount;
import com.sessionFactory.HibernateSessionFactory;


public class TestFindById {
	public static void main(String[] args) {
		QueryDao dao = new QueryDao();
		//BstCompanyAccount ca = dao.findById(BstCompanyAccount.class, Integer.valueOf(3816));
		BstCompanyAccount ca = dao.findByUniqe(BstCompanyAccount.class, "comid", 3816);
		System.out.println(ca.getCompanyName());
		//HibernateSessionFactory.getSession().get(arg0, arg1)
		String hql = "from BstCompanyAccount c where c.username="+"'kxph'";
/*		BstCompanyAccount ca = (BstCompanyAccount) HibernateSessionFactory.getSession().createQuery(hql).uniqueResult();
		System.out.println(ca.getCompanyName());*/
	}
}
